package com.world.rickcloudendpoint.api.controller;

import com.world.rickcloudendpoint.common.Result;
import com.world.rickcloudendpoint.common.exception.ClientException;
import com.world.rickcloudendpoint.common.exception.ErrorInfo;
import com.world.rickcloudendpoint.common.exception.ModuleException;
import com.world.rickcloudendpoint.models.vo.ASignalVO;
import io.swagger.annotations.*;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @description:
 * @author: jlsong
 * @date: 2022/04/06 06:07:33
 * @version: 1.0
 */
@ApiModel(value = "demoApi", description = "Rest Api for demo api operation")
public interface DemoApi {

    @ApiOperation(value = "显示例子的", notes = "显示例子的", response = Result.class, tags = {})
    @ApiResponses(value = {
            @ApiResponse(code = 201, message = "成功获取", response = ASignalVO.class),
            @ApiResponse(code = 400, message = "请求参数体异常", response = ErrorInfo.class),
            @ApiResponse(code = 401, message = "需进行身份验证", response = ErrorInfo.class),
            @ApiResponse(code = 403, message = "无权访问该接口", response = ErrorInfo.class),
            @ApiResponse(code = 404, message = "查无数据", response = Void.class),
            @ApiResponse(code = 500, message = "服务错误", response = ErrorInfo.class)})
    @PostMapping(value = "/demo/show", produces = {"application/json"})
    Result<Object> showDemo(@ApiParam(value = "新增音箱", required = true) @Validated @RequestParam String payload) throws ClientException, ModuleException;
}
